<template>
  <!-- 付款信息 -->
  <div id="collectDetail">
    <el-form :model="form" label-width="100">
      <!-- <el-form-item label="付款编号:">
        <p>{{ form.num }}</p>
      </el-form-item> -->
      <el-form-item label="付款名称:">
        <p>{{ form.title }}</p>
      </el-form-item>
      <el-form-item label="付款类型:">
        <p v-if="form.type == 1">供应商</p>
        <p v-if="form.type == 2">工资</p>
        <p v-if="form.type == 3">日常开支</p>
        <p v-if="form.type == 4">其他</p>
      </el-form-item>
      <el-form-item label="供应商名称:" v-if="form.type == 1">
        <p>{{ form.supplierName }}</p>
      </el-form-item>
      <el-form-item label="应付款金额:">
        <p>{{ form.money ? form.money : 0 }}元</p>
      </el-form-item>
      <el-form-item label="本次付款金额:">
        <p>{{ form.thisTimeMoney ? form.thisTimeMoney : 0 }}元</p>
      </el-form-item>
      <el-form-item label="付款时间:">
        <p>{{ form.payTime }}</p>
      </el-form-item>
      <el-form-item label="事由:">
        <p>{{ form.incident }}</p>
      </el-form-item>
      <el-form-item label="附件:" style="width: 100%">
        <other-files ref="otherFiles" :files="form.otherFileList"></other-files>
      </el-form-item>
      <el-form-item label="付款状态:">
        <p v-if="form.paymentStatus == 1" style="color: #67c23a">已付款</p>
        <p v-if="form.paymentStatus == 0" style="color: #f56c6c">未付款</p>
      </el-form-item>
      <template v-if="form.paymentStatus == 1">
        <el-form-item label="支付方式:">
          <p>{{ form.payTypeName }}</p>
        </el-form-item>
        <el-form-item label="付款账号:">
          <p>{{ form.payAccount }}</p>
        </el-form-item>
        <el-form-item label="确认付款时间:">
          <p>{{ form.confirmPayTime }}</p>
        </el-form-item></template
      >
      <el-form-item label="审核状态:" v-if="isReloadData" style="width: 100%">
        <p v-if="form.status == 0" style="color: #e6a23c">待审核</p>
        <p v-if="form.status == 1" style="color: #67c23a">通过</p>
        <p v-if="form.status == 2" style="color: #f56c6c">未通过</p>
        <p v-if="form.status == 3" style="color: #ff9b31">审核中</p>
      </el-form-item>
      <el-form-item label="创建时间:">
        <p>{{ form.createTime }}</p>
      </el-form-item>
      <el-form-item label="修改时间:" v-if="form.updateTime">
        <p>{{ form.updateTime }}</p>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
import otherFiles from '@/components/otherFiles'
export default {
  name: 'collectDetail',
  data () {
    return {
      // form: {},
      isReloadData: true//局部刷新标识
    }
  },
  components: {
    otherFiles,
  },
  props: {
    form: {
      type: Object,
      required: true,
      default: () => {
        return {}
      }
    }
  },
  methods: {

    relodPart () {
      this.isReloadData = false
      this.$nextTick(() => {
        this.isReloadData = true
      })
    }
  }
}
</script>
<style lang='scss' scoped>
</style>